import React, { FC, useContext } from 'react';
import { View, Text } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import { ProductCardContext } from '@/pages/components/ProductCard/ProductCardContext';
import { useOptionsRender } from './useOptionsRender';
export interface IProps extends ICompProps {}
ProductContentFooter.defaultProps = {} as Partial<IProps>;
function ProductContentFooter(props: IProps) {
    const { className, style } = props;
    const localClassName = useClassName('ProductContentFooter', className);
    const { price, classCard, footRight } = useContext(ProductCardContext);
    const { CompOptions } = useOptionsRender({ classCard, footRight });
    return (
        <RootView className={localClassName} style={style}>
            <View className="price">￥{price}</View>
            {CompOptions}
        </RootView>
    );
}
export default React.memo(ProductContentFooter as FC<IProps>);
const RootView = styled(View)`
    &.ProductContentFooter {
        display: flex;
        justify-content: space-between;
        align-items: center;
        .price {
            font-size: 36px;
            /* font-family: UniNeue-Bold, UniNeue; */
            font-weight: bold;
            color: #ff8828;
        }
    }
`;
